﻿<UserControl x:Class="Kokomo.PeInspector.Reflection.AssemblyReferencesView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:kui="xaml://kokomo/ui"
			 xmlns:env="xaml://kokomo/environment"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
		<kui:EnhancedTreeView
			ItemsSource="{Binding ReferencedAssemblyNodes}"
			>
			<TreeView.ItemContainerStyle>
				<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource {x:Static env:EditorStyleKeys.TreeNodeStyleKey}}">
					<Setter Property="kui:EventBindingManager.EventBindings">
						<Setter.Value>
							<kui:EventBindingCollection>
								<kui:RuntimeEventBinding
										EventName="ItemActivated"
										Command="{Binding DataContext.NavigateToCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
										CommandParameter="{Binding Target}"
										/>
							</kui:EventBindingCollection>
						</Setter.Value>
					</Setter>
				</Style>
			</TreeView.ItemContainerStyle>
		</kui:EnhancedTreeView>
    </Grid>
</UserControl>
